
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<head>
<title>Market place</title>
</head>

<body>
	<ui:composition>
		<p:panel id="pickupInfo" header="#{msgs.deliverPickUpInfo}"
			toggleable="true">
			<h:panelGrid columns="2" cellspacing="20px" style="width:100%">
				<h:outputText value="#{msgs.customer}:"></h:outputText>
				<h:outputText
					value="#{shoppingCartModel.customer.lastName} #{shoppingCartModel.customer.firstName}"></h:outputText>
				<h:outputText value="#{msgs.telephone}:"></h:outputText>
				<h:outputText value="#{shoppingCartModel.customer.telephone}"></h:outputText>
				<h:outputText value="#{msgs.pickUpLocation}:"></h:outputText>
				<p:outputLabel
					value="#{shoppingCartModel.location.name}, #{shoppingCartModel.location.address}, #{shoppingCartModel.location.postCode}"></p:outputLabel>

				<ui:remove>
					<p:panel
						header="#{shoppingCartModel.location.name}, #{shoppingCartModel.location.address}"
						toggleable="false" collapsed="false">
						<p:gmap model="#{shoppingCartModel.location.map}"
							center="#{shoppingCartModel.location.latitude},#{shoppingCartModel.location.longitude}"
							zoom="12" type="HYBRID" style="width:500px;height:400px"></p:gmap>
					</p:panel>
				</ui:remove>

				<h:inputHidden rendered="#{shoppingCartModel.location.isCanceled}"></h:inputHidden>
				<h:panelGroup rendered="#{shoppingCartModel.location.isCanceled}">
					<p:outputLabel value="#{msgs.locationCanceledTips},"						
						style="color:red"></p:outputLabel>
					<p:outputLabel value="#{msgs.please}"						
						style="color:red"></p:outputLabel>
						<p:outputLabel value="#{msgs.click}"						
						style="color:red"></p:outputLabel>
					<p:commandLink value=" #{msgs.myInfo} " action="/user/myInfo.xhtml?faces-redirect=true"></p:commandLink>
					<p:outputLabel value="#{msgs.chooseAnotherLocation}."						
						style="color:red"></p:outputLabel>
				</h:panelGroup>
				<h:outputText value="#{msgs.dateAndTime}:"
					rendered="#{!shoppingCartModel.location.isCanceled}"></h:outputText>
				<p:dataTable value="#{shoppingCartModel.availablePickupDates}"
					rendered="#{!shoppingCartModel.location.isCanceled}"
					selection="#{shoppingCartModel.newRequiredDate}" var="marketDate"
					emptyMessage="#{msgs.pickupDateListEmptyMessage}"
					rowKey="#{marketDate.key}">
					<ui:remove>
						<p:ajax event="rowSelect" update=":centerForm"></p:ajax>

						<p:column>
							<h:outputText value="#{marketDate.yearLabel}"></h:outputText>
						</p:column>
					</ui:remove>
					<p:column>
						<h:outputText value="#{marketDate.weekOfYearLabel}"></h:outputText>
					</p:column>
					<p:column>
						<h:outputText value="#{marketDate.dayOfWeekLabel}"></h:outputText>
					</p:column>
					<p:column>
						<h:outputText value="#{marketDate.dateLabel}"></h:outputText>
					</p:column>
					<p:column>
						<h:outputText value="#{marketDate.timeRangeLabel}"></h:outputText>
					</p:column>
					<p:column selectionMode="single" style="width:28px" />
				</p:dataTable>
				<h:outputText value="#{msgs.orderTips}"></h:outputText>
				<p:panel header="#{msgs.orderTips}" toggleable="true"
					collapsed="true">
					<h:panelGrid columns="1">
						<h:outputText value="#{msgs.orderTips1}" style="color:blue"></h:outputText>
						<h:outputText value="#{msgs.orderTips2}" style="color:green"></h:outputText>
						<h:outputText value="#{msgs.orderTips3}" style="color:blue"></h:outputText>
						<h:outputText value="#{msgs.orderTips4}" style="color:green"></h:outputText>
					</h:panelGrid>
				</p:panel>
				<h:inputHidden />
				<p:commandButton value="#{msgs.startShopping}"
					action="#{shoppingCartController.goShopping}" style="float:right"
					disabled="#{shoppingCartModel.availablePickupDatesEmpty}"></p:commandButton>
			</h:panelGrid>
			<p:effect event="show" type="bounce" for="pickupInfo"></p:effect>

		</p:panel>
	</ui:composition>
</body>

</html>


